﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace TestStudent
{
    [TestClass]
    public class StudentTest
    {
        [TestMethod]
        public void FacultyNumberTestInRange()
        {
            string name = "Federer";
            int facultyNumber = 10000;
            Student target = new Student(name, facultyNumber);
            Assert.AreEqual(10000, target.FacultyNumber);
        }

        [TestMethod]
        [ExpectedException(typeof(ArgumentOutOfRangeException))]
        public void FacultyNumberTestOutOfRange()
        {
            string name = "Federer";
            int facultyNumber = 0;
            Student target = new Student(name, facultyNumber);
        }

        [TestMethod]
        [ExpectedException(typeof(ArgumentException))]
        public void NameEmptyTest()
        {
            string name = string.Empty;
            int facultyNumber = 32352;
            Student target = new Student(name, facultyNumber);
        }

        [TestMethod]
        [ExpectedException(typeof(ArgumentNullException))]
        public void NameNullTest()
        {
            string name = null;
            int facultyNumber = 32352;
            Student target = new Student(name, facultyNumber);
        }

        [TestMethod]
        public void NameTest()
        {
            string name = "Donkey Hot";
            int facultyNumber = 32352;
            Student target = new Student(name, facultyNumber);
            Assert.AreEqual(name, target.Name);
        }
    }
}